package com.yasaka.stock.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "WordCount", url = "http://117.121.14.27:9090/")
public interface WordCountFeignClient {

	@RequestMapping(value = "/", method = RequestMethod.POST, consumes= MediaType.APPLICATION_FORM_URLENCODED_VALUE)
	public String countWithTxt(
			@RequestParam(value = "method") String method,
			@RequestParam(value = "content") String content, 
			@RequestParam(value = "from") String from,
			@RequestParam(value = "userID") String userID, 
			@RequestParam(value = "sID") String sID);

	@RequestMapping(value = "/", method = RequestMethod.POST, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
	public String advancedCountWords(
			@RequestParam(value = "method") String method,
			@RequestParam(value = "data") String content);

}